#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int k = 0;
	int n = 0;
	scanf("%d %d", &n, &k);
	int sum = 0;
	int t = n;
	for (int i = 1; i <= k; i++)
	{
		sum += t;
		t = t * 10 + n;
	}
	printf("%d", sum);
	return 0;
}